home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / bcfamily / source / viotty.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-12  |  863 b   |  35 lines

  1. //
  2. //      *******************************************************************
  3. //        JdeBP C++ Library Routines          General Public Licence v1.00
  4. //            Copyright (c) 1991,1992     Jonathan de Boyne Pollard
  5. //      *******************************************************************
  6. //
  7. // Part of FamAPI.LIB
  8. //
  9.  
  10. #include "famapi.h"
  11. #include "vio.h"
  12.  
  13. #pragma argsused
  14. //
  15. //    Write a string of characters, TTY fashion
  16. //
  17. USHORT _APICALL
  18. VioWrtTTy ( const char far * PtrString,
  19.             unsigned short StringLen,
  20.             unsigned short VioHandle )
  21. {
  22.     while (StringLen--) {
  23.         _AH = 0x08 ;
  24.         _BH = 0x00 ;
  25.         geninterrupt(0x10) ;        // Read cell at cursor
  26.         _AH = 0x0E ;
  27.         asm push BX ;                // (pointer modifies ES:BX)
  28.         _AL = *(PtrString)++ ;        // Character (keep attribute)
  29.         asm pop BX ;
  30.         geninterrupt(0x10) ;        // Write a cell, TTY style
  31.     }
  32.  
  33.     return NO_ERROR ;
  34. }
  35.